home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / u_man / cat1 / dbx.z / dbx
Text File  |  1998-10-30  |  41KB  |  894 lines

  1.  
  2.  
  3.  
  4. DDDDBBBBXXXX((((1111))))                                                                  DDDDBBBBXXXX((((1111))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      dbx - a source-level debugger
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ddddbbbbxxxx dbx-options [[[[object-file]]]] [[[[core-file]]]]
  13.  
  14.      ddddbbbbxxxx dbx-options ----pppp pid
  15.  
  16.      ddddbbbbxxxx dbx-options ----PPPP name
  17.  
  18.      ddddbbbbxxxx dbx-options ----rrrr  [[[[object-file]]]] [[[[arguments . . .]]]]
  19.  
  20.      dbx-options: [[[[----IIII directory ]]]] [[[[ ----cccc file ]]]] [[[[ ----eeee evalsizelimit ]]]] [[[[ ----iiii ]]]] [[[[ ----kkkk ]]]] [[[[ ----NNNN ]]]] [[[[ ----xxxx ]]]]
  21.  
  22. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  23.      _d_b_x is a source-level debugger that allows the user to trace the
  24.      execution of a given _o_b_j_e_c_t-_f_i_l_e as well as a pool of arbitrary
  25.      processes.  _d_b_x works with _c_c(1), _f_7_7(1), _p_c(1) _a_s(1), _C_C(1), and MIPS
  26.      machine code on 32- and 64-bit ELF _o_b_j_e_c_t-_f_i_l_es.
  27.  
  28.      The _o_b_j_e_c_t-_f_i_l_e used with the debugger is produced by specifying an
  29.      appropriate option (usually ----gggg) to the compiler (and linking the
  30.      resulting object(s), creating an executable _o_b_j_e_c_t-_f_i_l_e).  The resulting
  31.      _o_b_j_e_c_t-_f_i_l_e contains debugging information, including the names of all
  32.      source files that the compiler translated to create the _o_b_j_e_c_t-_f_i_l_e.
  33.      These source files are accessible from the debugger.
  34.  
  35.      If a _c_o_r_e-_f_i_l_e is specified, or if the file _c_o_r_e exists in the current
  36.      directory, _d_b_x can be used to look at the state of the program when it
  37.      faulted.
  38.  
  39.      The file /_u_s_r/_l_i_b/_d_b_x._h_e_l_p  is a text file explaining features of _d_b_x.
  40.      Read it for additional information on assembler-level debugging,
  41.      expressions in _d_b_x, and examples.
  42.  
  43.      This man page shows only some of the dbx commands:  See the help file and
  44.      the appropriate reference manual for details and for information on
  45.      additional features.
  46.  
  47.  
  48. RRRRuuuunnnnnnnniiiinnnngggg ddddbbbbxxxx
  49.      If a ._d_b_x_i_n_i_t file resides in the current directory or in the user's home
  50.      directory, the commands in it are executed when _d_b_x is invoked.
  51.  
  52.      The environment variable DDDDBBBBXXXXIIIINNNNIIIITTTT may be used to hold dbx command line
  53.      options.  If present, the contents of DDDDBBBBXXXXIIIINNNNIIIITTTT are inserted before the
  54.      command line options.
  55.  
  56.      When invoked, _d_b_x recognizes these command line options:
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. DDDDBBBBXXXX((((1111))))                                                                  DDDDBBBBXXXX((((1111))))
  71.  
  72.  
  73.  
  74.      ----IIII _d_i_r_e_c_t_o_r_y
  75.              Tells _d_b_x to look in the specified directory for source files.
  76.              Multiple directories can be specified by using multiple ----IIII
  77.              options.  _d_b_x searches for source files in the current directory
  78.              and in the _o_b_j_e_c_t-_f_i_l_e's directory whether or not ----IIII is used.
  79.  
  80.      ----cccc _f_i_l_e Selects a command file other than ._d_b_x_i_n_i_t.
  81.  
  82.      ----iiii      Uses interactive mode.  This option does not treat #s as comments
  83.              in a file.  It prompts for source even when it reads from a file.
  84.              With this option, _d_b_x also has extra formatting as if for a
  85.              terminal.
  86.  
  87.      ----pppp _p_i_d  Debug the running process with the specified process id.
  88.  
  89.      ----PPPP _n_a_m_e Debug the running process with the specified name (_n_a_m_e as shown
  90.              in _p_s(1)).
  91.  
  92.      ----RRRR      Turn on $debugrld at startup, so one can set breakpoints in
  93.              _r_l_d(1).
  94.  
  95.      ----rrrr      Runs the _o_b_j_e_c_t-_f_i_l_e immediately.  Arguments may be placed on the
  96.              _d_b_x command line.  The ._d_b_x_i_n_i_t file (if any) is read in and the
  97.              commands in it executed after the _o_b_j_e_c_t-_f_i_l_e is run.
  98.  
  99.      ----eeee nnnnnnnnnnnnnnnn Choose a larger size for  the evaluation space.  Printing a very
  100.              large structure one can exhaust the default 20,000 bytes of
  101.              evaluation space.  With this option you can make the space as
  102.              large as desired.  For example, to make the stack 100,000 bytes:
  103.  
  104.                      -e 100000
  105.  
  106.  
  107.      ----kkkk      Debug the operating system.  When debugging a running system,
  108.              /_d_e_v/_k_m_e_m should be specified as the _c_o_r_e-_f_i_l_e.
  109.  
  110.      ----NNNN      Sets the dbx variable $nonstop to 1 on startup.  When $nonstop is
  111.              1, any process attached to is left running rather than stopped.
  112.              So, for example ddddbbbbxxxx ----NNNN ----pppp 11112222333344445555 will start up dbx and attach to
  113.              process 12345 but will leave the process running.
  114.  
  115.  
  116.  
  117. TTTThhhheeee MMMMoooonnnniiiittttoooorrrr
  118.      The following commands control the _d_b_x monitor.  Multiple commands can be
  119.      specified on the same command line by separating them with a semicolon
  120.      (;).
  121.  
  122.      !!!![_s_t_r_i_n_g] [_i_n_t_e_g_e_r] [-_i_n_t_e_g_e_r]
  123.              Specifies a command from the history list.
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. DDDDBBBBXXXX((((1111))))                                                                  DDDDBBBBXXXX((((1111))))
  137.  
  138.  
  139.  
  140.      hhhheeeellllpppp    Prints a short list of _d_b_x help topics and suggests some uses of
  141.              the help command.
  142.  
  143.      hhhhiiiissssttttoooorrrryyyy Prints the items from the history list.  The history list is
  144.              $_l_i_n_e_s lines long (20 by default).
  145.  
  146.      hhhheeeedddd _i_n_t Brings the history list line into an editor in a temporary file.
  147.              Whatever commands are still in the editor temporary file when you
  148.              quit the editor are executed as ordinary dbx commands.
  149.  
  150.      qqqquuuuiiiitttt    Exits _d_b_x.
  151.  
  152.  
  153. CCCCoooonnnnttttrrrroooolllllllliiiinnnngggg ddddbbbbxxxx
  154.      aaaalllliiiiaaaassss   Lists all existing aliases.
  155.  
  156.      aaaalllliiiiaaaassss _n_a_m_e
  157.              Lists the alias string for _n_a_m_e.  The alias value is inserted in
  158.              quotes with escape characters added to show how the alias
  159.              """"_s_t_r_i_n_g"""" was typed.  See the help file (/_u_s_r/_l_i_b/_d_b_x._h_e_l_p)
  160.              EEEEXXXXPPPPRRRREEEESSSSSSSSIIIIOOOONNNNSSSS section for additional information on strings and
  161.              character escapes.
  162.  
  163.      aaaalllliiiiaaaassss _n_a_m_e _n_a_m_e_2
  164.              Defines a new alias.
  165.  
  166.      uuuunnnnaaaalllliiiiaaaassss _a_l_i_a_s__n_a_m_e
  167.              Removes the alias _a_l_i_a_s__n_a_m_e from the alias table.
  168.  
  169.      ddddeeeelllleeeetttteeee _e_x_p_r_e_s_s_i_o_n_1, ..._e_x_p_r_e_s_s_i_o_n_N
  170.              Deletes the specified item(s) from the status list.
  171.  
  172.      ggggiiiivvvveeeennnnffffiiiilllleeee
  173.              Reports the name of the current _g_i_v_e_n_f_i_l_e (usually called an
  174.              _o_b_j_e_c_t-_f_i_l_e on this page).
  175.  
  176.      ggggiiiivvvveeeennnnffffiiiilllleeee _o_b_j_e_c_t-_f_i_l_e
  177.              The argument _o_b_j_e_c_t-_f_i_l_e is taken as the name of the file to
  178.              debug, just as if _o_b_j_e_c_t-_f_i_l_e had been given on the _d_b_x command
  179.              line.  Existing processes are killed and _d_b_x looks up the symbol
  180.              table and _c_o_r_e-_f_i_l_e for this _o_b_j_e_c_t-_f_i_l_e.
  181.  
  182.      ccccoooorrrreeeeffffiiiilllleeee
  183.              Reports the current _c_o_r_e-_f_i_l_e name and whether data referencing
  184.              commands actually reference the _c_o_r_e-_f_i_l_e or not.  They will not
  185.              reference the _c_o_r_e-_f_i_l_e if it is missing or damaged or if the
  186.              process is running.
  187.  
  188.      ccccoooorrrreeeeffffiiiilllleeee _c_o_r_e-_f_i_l_e
  189.              The argument _c_o_r_e-_f_i_l_e is taken as the name of a _c_o_r_e-_f_i_l_e to
  190.              debug, just as if _c_o_r_e-_f_i_l_e had been given on the _d_b_x command
  191.              line.  References to the process will use this _c_o_r_e-_f_i_l_e.
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. DDDDBBBBXXXX((((1111))))                                                                  DDDDBBBBXXXX((((1111))))
  203.  
  204.  
  205.  
  206.      ppppllllaaaayyyybbbbaaaacccckkkk iiiinnnnppppuuuutttt [_f_i_l_e]
  207.              Reads the commands in the file and executes them.
  208.  
  209.      sssshhhh      Calls a shell from _d_b_x.  If the environment variable SSSSHHHHEEEELLLLLLLL is
  210.              set, its value is taken as the name of the shell to use.  If
  211.              SSSSHHHHEEEELLLLLLLL is not set, _c_s_h(1) is used.
  212.  
  213.      sssshhhh _s_h_e_l_l _c_o_m_m_a_n_d
  214.              Executes a shell command.
  215.  
  216.      ssssttttaaaattttuuuussss  Lists currently set ssssttttoooopppp, ttttrrrraaaacccceeee, and wwwwhhhheeeennnn  commands.
  217.  
  218.      sssseeeetttt     Lists existing debugger variables and their values.
  219.  
  220.      sssseeeetttt _v_a_r_i_a_b_l_e = _e_x_p_r_e_s_s_i_o_n
  221.              Assigns a new value to an existing variable or a new variable.
  222.              If the expression result is not of type ``int'' the sssseeeetttt command
  223.              will leave the result symbolic.  To get the expression fully
  224.              evaluated, cast the result to ``int'' as in sssseeeetttt _v_a_r_i_a_b_l_e =
  225.              ((((iiiinnnntttt))))_e_x_p_r_e_s_s_i_o_n.
  226.  
  227.      uuuunnnnsssseeeetttt _v_a_r_i_a_b_l_e
  228.              Removes the specified debugger variable and its value from the
  229.              debugger variable table.
  230.  
  231.  
  232. EEEExxxxaaaammmmiiiinnnniiiinnnngggg SSSSoooouuuurrrrcccceeee
  233.      ////_r_e_g_u_l_a_r _e_x_p_r_e_s_s_i_o_n
  234.              Searches ahead in the source code for the regular expression.
  235.  
  236.      ????_r_e_g_u_l_a_r _e_x_p_r_e_s_s_i_o_n
  237.              Searches back in the source code for the regular expression.
  238.  
  239.      ddddiiiirrrreeeeccccttttoooorrrryyyy
  240.              Lists source directories.  Abbreviate as ddddiiiirrrr.
  241.  
  242.      ddddiiiirrrreeeeccccttttoooorrrryyyy _d_i_r_e_c_t_o_r_y_1 ... _d_i_r_e_c_t_o_r_y_N
  243.              Adds the new directory(s) to the previous list.  Can be
  244.              abbreviated ddddiiiirrrr.  See also uuuusssseeee.
  245.  
  246.      eeeeddddiiiitttt    Calls an editor on the current file from _d_b_x.
  247.  
  248.      eeeeddddiiiitttt _f_i_l_e
  249.              Calls an editor from _d_b_x.
  250.  
  251.      eeeeddddiiiitttt _f_u_n_c
  252.              Calls an editor on the file in which function _f_u_n_c is defined.
  253.  
  254.      ffffiiiilllleeee    Prints the current file name.
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. DDDDBBBBXXXX((((1111))))                                                                  DDDDBBBBXXXX((((1111))))
  269.  
  270.  
  271.  
  272.      ffffiiiilllleeee _f_i_l_e
  273.              Changes the current file to the specified file.
  274.  
  275.      lllliiiisssstttt _e_x_p_r_e_s_s_i_o_n
  276.              Lists  $_l_i_s_t_w_i_n_d_o_w lines starting at line _e_x_p_r_e_s_s_i_o_n.
  277.  
  278.      lllliiiisssstttt _e_x_p_r_e_s_s_i_o_n,_e_x_p_r_e_s_s_i_o_n_2
  279.              Lists  lines _e_x_p_r_e_s_s_i_o_n thru _e_x_p_r_e_s_s_i_o_n_2.
  280.  
  281.      uuuusssseeee     Lists source directories.
  282.  
  283.      uuuusssseeee _d_i_r_e_c_t_o_r_y_1 ... _d_i_r_e_c_t_o_r_y_N
  284.              Substitutes the new directories for the previous list.  See also
  285.              ddddiiiirrrreeeeccccttttoooorrrryyyy.
  286.  
  287.      wwwwhhhhaaaattttiiiissss _v_a_r_i_a_b_l_e
  288.              Prints a type declaration.  _v_a_r_i_a_b_l_e may be a variable or a type.
  289.  
  290.      wwwwhhhhiiiicccchhhh _v_a_r_i_a_b_l_e
  291.              Finds the variable name currently being used.
  292.  
  293.      wwwwhhhheeeerrrreeeeiiiissss _v_a_r_i_a_b_l_e
  294.              Prints all qualifications (scopes) of the specified variable
  295.              name.
  296.  
  297. CCCCoooonnnnttttrrrroooolllllllliiiinnnngggg PPPPrrrrooooggggrrrraaaammmmssss
  298.      aaaassssssssiiiiggggnnnn _e_x_p_r_e_s_s_i_o_n_1 = _e_x_p_r_e_s_s_i_o_n_2
  299.              Assigns the specified expression to a specified program variable.
  300.              If the _i_n_c_o_m_p_a_t_i_b_l_e _t_y_p_e_s message appears when you try to assign
  301.              a value to a pointer, use casts to make the assignment work.
  302.              Example: assign x = 12
  303.  
  304.      ccccoooonnnntttt    Resume execution and wait for a break or other event.
  305.  
  306.      ccccoooonnnntttt _s_i_g_n_a_l
  307.              Send signal _s_i_g_n_a_l to the process, resume execution, and wait for
  308.              a break or other event.  For further information about signals
  309.              see the Execution Tracing section ccccaaaattttcccchhhh and iiiiggggnnnnoooorrrreeee commands and
  310.              discussion.
  311.  
  312.      kkkkiiiillllllll  _p_i_d ...
  313.              Kill the active process(es) whose process id(s) are specified.
  314.  
  315.      nnnneeeexxxxtttt [_i_n_t_e_g_e_r]
  316.              Step over the specified number of lines.  The default is one.
  317.              This command does not step into procedures.  Breakpoints in
  318.              procedures stepped over are honored.  See $_n_e_x_t_b_r_e_a_k and
  319.              $_s_t_e_p_i_n_t_o_a_l_l for information on modifying the behavior of nnnneeeexxxxtttt.
  320.  
  321.      pppprrrriiiinnnntttteeeennnnvvvv  [_e_n_v-_v_a_r-_n_a_m_e]
  322.              prints the environment variable named in the environment internal
  323.              to dbx.  With no environment variable named, prints the names and
  324.  
  325.  
  326.  
  327.                                                                         PPPPaaaaggggeeee 5555
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334. DDDDBBBBXXXX((((1111))))                                                                  DDDDBBBBXXXX((((1111))))
  335.  
  336.  
  337.  
  338.              values of the all the environment variables in the environment
  339.              internal to dbx.  See sssseeeetttteeeennnnvvvv below.
  340.  
  341.      rrrreeeerrrruuuunnnn [_a_r_g_1 ... _a_r_g_N]
  342.              Rerun the program, using the same arguments that were specified
  343.              to the rrrruuuunnnn command.  If new arguments are specified, rrrreeeerrrruuuunnnn uses
  344.              those arguments.  Any redirection or other features supported by
  345.              your shell may be used.
  346.  
  347.      rrrreeeessssuuuummmmeeee  Resume execution of the program, and return immediately to the
  348.              _d_b_x command interpreter.
  349.  
  350.      rrrreeeessssuuuummmmeeee _s_i_g_n_a_l
  351.              Resume execution of the process, sending it signal _s_i_g_n_a_l, and
  352.              return immediately to the _d_b_x command interpreter.
  353.  
  354.      rrrruuuunnnn [_a_r_g_1 ... _a_r_g_N] [< _f_i_l_e_1] [> _f_i_l_e_2]
  355.              Runs the program with the specified arguments.
  356.  
  357.      rrrreeeettttuuuurrrrnnnn  Continue execution until control returns to the next procedure up
  358.              the activation stack.
  359.  
  360.      sssseeeetttteeeennnnvvvv  _e_n_v-_v_a_r-_n_a_m_e  _v_a_l_u_e
  361.              Sets the environment internal to dbx to have this environment
  362.              variable.  Just like the _c_s_h(1) command, but does not affect the
  363.              _d_b_x startup since _d_b_x has already started up before one enters
  364.              this command.  Primarily useful for setting environment variables
  365.              used by the application or by _r_l_d(1) before rrrruuuunnnn or rrrreeeerrrruuuunnnn of the
  366.              application being debugged.
  367.  
  368.      sssstttteeeepppp [_i_n_t_e_g_e_r]
  369.              Step the specified number of lines.  The default is one line.
  370.              Breakpoints in procedures stepped over are honored.
  371.  
  372.      ssssyyyyssssccccaaaallllllll Prints the list of system calls in 4 sections.  System calls may
  373.              be caught (breakpointed) at the time the call is made or when the
  374.              system call is about to return.  This command prints the system
  375.              calls in the four sections: 1) caught at call 2) ignored at call
  376.              3) caught at return  4) ignored at return.  The system calls are
  377.              all listed in /_u_s_r/_i_n_c_l_u_d_e/_s_y_s._s
  378.  
  379.      ssssyyyyssssccccaaaallllllll ccccaaaattttcccchhhh ccccaaaallllllll _s_y_s_c_a_l_l ...
  380.              The named system calls breakpoint at the entry of the system
  381.              call.
  382.  
  383.      ssssyyyyssssccccaaaallllllll iiiiggggnnnnoooorrrreeee ccccaaaallllllll _s_y_s_c_a_l_l ...
  384.              The named system calls not breakpoint at the entry of the system
  385.              call.
  386.  
  387.      ssssyyyyssssccccaaaallllllll ccccaaaattttcccchhhh rrrreeeettttuuuurrrrnnnn _s_y_s_c_a_l_l ...
  388.              The named system calls breakpoint at the return from the system
  389.              call.
  390.  
  391.  
  392.  
  393.                                                                         PPPPaaaaggggeeee 6666
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400. DDDDBBBBXXXX((((1111))))                                                                  DDDDBBBBXXXX((((1111))))
  401.  
  402.  
  403.  
  404.      ssssyyyyssssccccaaaallllllll iiiiggggnnnnoooorrrreeee rrrreeeettttuuuurrrrnnnn _s_y_s_c_a_l_l ...
  405.              The named system calls not breakpoint at the return from the
  406.              system call.
  407.  
  408.      uuuunnnnsssseeeetttteeeennnnvvvv  _e_n_v-_v_a_r-_n_a_m_e
  409.              Unsets (removes) the environment variable in the environment
  410.              internal to dbx.  See sssseeeetttteeeennnnvvvv above.
  411.  
  412.  
  413. EEEExxxxeeeeccccuuuuttttiiiioooonnnn ttttrrrraaaacccciiiinnnngggg
  414.      ccccaaaattttcccchhhh   Lists all signals that _d_b_x catches.
  415.  
  416.      ccccaaaattttcccchhhh _s_i_g_n_a_l
  417.              Adds a new signal to the catch list.  A _s_i_g_n_a_l is specified as a
  418.              name or as a number.  For example, the interrupt signal is named
  419.              INT, SIGINT, or 2.
  420.  
  421.      iiiiggggnnnnoooorrrreeee  Lists all signals that _d_b_x does not catch.
  422.  
  423.      iiiiggggnnnnoooorrrreeee _s_i_g_n_a_l
  424.              Adds a signal _s_i_g_n_a_l to the ignore list.  A _s_i_g_n_a_l is specified
  425.              as a name or as a number.  For example, the interrupt signal is
  426.              named INT, SIGINT, or 2.  A process sees this signal when
  427.              directed at it by itself or another process.  The process
  428.              responds to the signal just as if _d_b_x were not present.
  429.  
  430.  
  431.      ssssttttoooopppp _v_a_r_i_a_b_l_e
  432.              Sets up to stop execution when _v_a_r_i_a_b_l_e changes.
  433.  
  434.      ssssttttoooopppp iiiinnnn _p_r_o_c_e_d_u_r_e
  435.              Sets up to stop execution when _p_r_o_c_e_d_u_r_e is entered.
  436.  
  437.      ssssttttoooopppp  aaaatttt _l_i_n_e
  438.              Sets a breakpoint at the specified source line.
  439.  
  440.  
  441.      ttttrrrraaaacccceeee prints information about the process when the trace conditions are
  442.      satisfied, but program execution continues.
  443.  
  444.      ttttrrrraaaacccceeee _v_a_r_i_a_b_l_e
  445.              When _v_a_r_i_a_b_l_e changes, print its old and new values.  (Execution
  446.              will be very slow).
  447.  
  448.      ttttrrrraaaacccceeee _p_r_o_c_e_d_u_r_e
  449.              When _p_r_o_c_e_d_u_r_e is entered, print its arguments and its caller's
  450.              name.
  451.  
  452.  
  453.      wwwwhhhheeeennnn is similar to ssssttttoooopppp  except that rather than stopping when the
  454.      conditions are met, the _c_o_m_m_a_n_d-_l_i_s_t (_d_b_x commands separated by semi-
  455.      colons) is executed.  If one of the commands in the list is ssssttttoooopppp (with no
  456.  
  457.  
  458.  
  459.                                                                         PPPPaaaaggggeeee 7777
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466. DDDDBBBBXXXX((((1111))))                                                                  DDDDBBBBXXXX((((1111))))
  467.  
  468.  
  469.  
  470.      operands) then the process will stop when the _c_o_m_m_a_n_d-_l_i_s_t is executed.
  471.  
  472.      wwwwhhhheeeennnn  aaaatttt _l_i_n_e {{{{ _c_o_m_m_a_n_d-_l_i_s_t }}}}
  473.              Execute the specified _c_o_m_m_a_n_d-_l_i_s_t when the conditions are met.
  474.  
  475.      wwwwhhhheeeennnn  iiiinnnn _p_r_o_c_e_d_u_r_e {{{{ _c_o_m_m_a_n_d-_l_i_s_t }}}}
  476.              Execute the specified _c_o_m_m_a_n_d-_l_i_s_t when the conditions are met.
  477.  
  478.  
  479. EEEExxxxaaaammmmiiiinnnniiiinnnngggg PPPPrrrrooooggggrrrraaaammmm SSSSttttaaaatttteeee
  480.      dddduuuummmmpppp    Prints variable information about the current procedure.
  481.  
  482.      dddduuuummmmpppp ....  Prints variable information for all procedures currently active.
  483.  
  484.      ddddoooowwwwnnnn    Moves down one activation level in the stack.
  485.  
  486.      ddddoooowwwwnnnn _n  Moves down the specified number of activation levels on the
  487.              stack.
  488.  
  489.      uuuupppp      Moves up one activation level on the stack.
  490.  
  491.      uuuupppp _n    Moves up the specified number of activation levels on the stack.
  492.  
  493.      lllliiiissssttttoooobbbbjjjj Lists the a.out and all active DSOs and their text regions.
  494.  
  495.      lllliiiissssttttrrrreeeeggggiiiioooonnnnssss
  496.              Lists all active memory regions which are part of the executing
  497.              program.
  498.  
  499.      pppprrrriiiinnnntttt _e_x_p_r_e_s_s_i_o_n_1,..._e_x_p_r_e_s_s_i_o_n_N
  500.              Prints the value(s) of the specified expression(s).  pppprrrriiiinnnnttttdddd,
  501.              pppprrrriiiinnnnttttoooo, pppprrrriiiinnnnttttxxxx similarly print the values, but in decimal, octal,
  502.              and hex (respectively)
  503.  
  504.      pppprrrriiiinnnnttttrrrreeeeggggssss
  505.              Prints all register values.
  506.  
  507.      wwwwhhhheeeerrrreeee   Does a stack trace, showing the current activation levels.
  508.  
  509.      wwwwhhhheeeerrrreeee _n Does a stack trace, showing the first _n activation levels.
  510.  
  511.  
  512. DDDDeeeebbbbuuuuggggggggiiiinnnngggg aaaatttt tttthhhheeee MMMMaaaacccchhhhiiiinnnneeee LLLLeeeevvvveeeellll
  513.      ssssttttooooppppiiii, wwwwhhhheeeennnniiii, and ttttrrrraaaacccceeeeiiii have the same meanings and options as ssssttttoooopppp wwwwhhhheeeennnn,
  514.      and ttttrrrraaaacccceeee except that ssssttttooooppppiiii, wwwwhhhheeeennnniiii, and ttttrrrraaaacccceeeeiiii step in units of machine
  515.      instructions rather than source lines.  A few of the possibilities
  516.      follow:
  517.  
  518.  
  519.      ccccoooonnnnttttiiii ttttoooo _a_d_d_r_e_s_s
  520.              Set a breakpoint at _a_d_d_r_e_s_s and continue.
  521.  
  522.  
  523.  
  524.  
  525.                                                                         PPPPaaaaggggeeee 8888
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532. DDDDBBBBXXXX((((1111))))                                                                  DDDDBBBBXXXX((((1111))))
  533.  
  534.  
  535.  
  536.      nnnneeeexxxxttttiiii [_i_n_t_e_g_e_r]
  537.              Steps over the specified number of machine instructions.  The
  538.              default is one.  This command does not step into procedures.
  539.  
  540.      sssstttteeeeppppiiii [_i_n_t_e_g_e_r]
  541.              Steps the specified number of machine instructions.  This command
  542.              steps into procedures even if no source, symbols, or line numbers
  543.              are present.  The default is one instruction.
  544.  
  545.      ssssttttooooppppiiii  aaaatttt _a_d_d_r_e_s_s
  546.              Set a breakpoint at _a_d_d_r_e_s_s.
  547.  
  548.      _a_d_d_r_e_s_s //// _c_o_u_n_t  _f_o_r_m_a_t
  549.              Prints the contents of the specified address or disassembles the
  550.              code for the instruction at the specified address.  Repeated for
  551.              a total of _c_o_u_n_t addresses in increasing address.  This might
  552.              also be termed the ``examine forward'' command.  With ???? instead
  553.              of //// it examines in decreasing address.
  554.  
  555.              A partial list of command formats:
  556.                       ______________________________________________
  557.                        format   data size   print
  558.                         name     in bits    format
  559.                       ______________________________________________
  560.                          D         32       signed decimal
  561.                          dd        64       signed decimal
  562.                          X         32       hexadecimal
  563.                          xx        64       hexadecimal
  564.                          V         32       unsigned decimal
  565.                          vv        64       unsigned decimal
  566.                          c          8       character
  567.                          s                  string of characters
  568.                                             ending in null byte
  569.                          f         32       single precision
  570.                                             real number
  571.                          g         64       double precision
  572.                                             real number
  573.                          i         32       instruction disassembly
  574.                       ______________________________________________
  575.                       ||||||||||||||||||
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.  
  592.                                                                     ||||||||||||||||||
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.  
  601.  
  602.  
  603.  
  604.  
  605.  
  606.  
  607.  
  608.  
  609.  
  610.  
  611.              EEEExxxxaaaammmmpppplllleeee::::
  612.  
  613.              $curpc-20/20i
  614.                      prints 20 disassembled machine instructions starting at
  615.                      the current pc-20.
  616.  
  617.              Complicated address expressions require parentheses around the
  618.              address expression.
  619.  
  620.  
  621.  
  622.  
  623.  
  624.  
  625.  
  626.                                                                         PPPPaaaaggggeeee 9999
  627.  
  628.  
  629.  
  630.  
  631.  
  632.  
  633. DDDDBBBBXXXX((((1111))))                                                                  DDDDBBBBXXXX((((1111))))
  634.  
  635.  
  636.  
  637.              EEEExxxxaaaammmmpppplllleeee::::
  638.  
  639.              (0x400500 + (($a1>>3) &0xfff))/11
  640.                      prints 11 64-bit words in hexadecimal starting at the
  641.                      calculated address.
  642.  
  643.  
  644. MMMMuuuullllttttiiiipppplllleeee pppprrrroooocccceeeessssssss ddddeeeebbbbuuuuggggggggiiiinnnngggg
  645.      If desired, a number of processes can be traced in a single _d_b_x session.
  646.      Processes can be added or subtracted from the ``process pool''.  A single
  647.      process is identified as the ``active process'' and relevant commands
  648.      will be applied to this process' execution and address space.
  649.  
  650.      If a process performs an _e_x_e_c_v() or an _e_x_e_c_v_e() system call, it will stop
  651.      itself and allow _d_b_x to read its new symbol information.
  652.  
  653.      Many commands take a 'pid <pid> clause.  Using the  ppppiiiidddd _p_i_d clause means
  654.      you can apply a command to any process in the process pool even though it
  655.      is not the active process.
  656.  
  657.      Example:  step pid 3345
  658.  
  659.      aaaaccccttttiiiivvvveeee  Prints the active process's process id.
  660.  
  661.      aaaaccccttttiiiivvvveeee _p_i_d
  662.              Make the process the active process.
  663.  
  664.      sssshhhhoooowwwwpppprrrroooocccc
  665.              Print the status of all processes in the pool.
  666.  
  667.      $_l_a_s_t_c_h_i_l_d is always set to the process id of the last child _f_o_r_ked.
  668.  
  669.      $_p_i_d_0   is always set to the process id of the ggggiiiivvvveeeennnn process, (called
  670.              _o_b_j_e_c_t-_f_i_l_e in the Synopsis).
  671.  
  672.  
  673. PPPPtttthhhhrrrreeeeaaaaddddssss DDDDeeeebbbbuuuuggggggggiiiinnnngggg FFFFaaaacccciiiilllliiiittttiiiieeeessss
  674.      The pthreads debugging facility allows one to see some things per thread.
  675.      The set of things one can do per thread is, as yet, limited to just the
  676.      wwwwhhhheeeerrrreeee command.
  677.  
  678.      The intent is that one can do commands with the command modifiers tttthhhhrrrreeeeaaaadddd
  679.      <<<<tttthhhhrrrreeeeaaaadddd----iiiidddd>>>> or tttthhhhrrrreeeeaaaadddd aaaallllllll to see any (appropriate) command applied to a
  680.      particular thread or to all the threads.  For example, to see the stack
  681.      trace for all pthreads, type where thread all .
  682.  
  683.      With IRIX6.5 and later, one can control multiple processes, each with
  684.      multiple threads.  The multiple processes can be in a Process Group
  685.      (discussed below) though the threads in each process are completely
  686.      separate from the threads in any other process in the group:  each
  687.      process is independently pthreaded.  In IRIX6.5 the showthread commands
  688.      and the "thread" command modifier apply to the active process.
  689.  
  690.  
  691.  
  692.                                                                        PPPPaaaaggggeeee 11110000
  693.  
  694.  
  695.  
  696.  
  697.  
  698.  
  699. DDDDBBBBXXXX((((1111))))                                                                  DDDDBBBBXXXX((((1111))))
  700.  
  701.  
  702.  
  703.      With IRIX6.4 and earlier one can control only one set of threads (using
  704.      multiple processes).  See the dbx help file for more information on
  705.      IRIX6.4 and earlier pthreads as it will not be discussed further here.
  706.  
  707.      Commands unique to threads are:
  708.  
  709.      sssshhhhoooowwwwtttthhhhrrrreeeeaaaadddd
  710.              Prints basic information about the current thread.
  711.  
  712.      sssshhhhoooowwwwtttthhhhrrrreeeeaaaadddd <<<<nnnnuuuummmmbbbbeeeerrrr>>>>
  713.              Prints basic information about the thread with that number.  A
  714.              typical example is _s_h_o_w_t_h_r_e_a_d _0_x_8_0_0_0_1 .
  715.  
  716.      sssshhhhoooowwwwtttthhhhrrrreeeeaaaadddd tttthhhhrrrreeeeaaaadddd <<<<nnnnuuuummmmbbbbeeeerrrr>>>>
  717.              Prints basic information about the thread with that number.
  718.  
  719.      sssshhhhoooowwwwtttthhhhrrrreeeeaaaadddd aaaallllllll
  720.              Prints basic information about all the threads.
  721.  
  722.      sssshhhhoooowwwwtttthhhhrrrreeeeaaaadddd tttthhhhrrrreeeeaaaadddd aaaallllllll
  723.              Prints basic information about all the threads.
  724.  
  725.      sssshhhhoooowwwwtttthhhhrrrreeeeaaaadddd ffffuuuullllllll
  726.              Prints full thread information about the current thread.
  727.  
  728.      sssshhhhoooowwwwtttthhhhrrrreeeeaaaadddd ffffuuuullllllll tttthhhhrrrreeeeaaaadddd <<<<nnnnuuuummmmbbbbeeeerrrr>>>>
  729.              Prints full thread information information about the thread with
  730.              that number.
  731.  
  732.      sssshhhhoooowwwwtttthhhhrrrreeeeaaaadddd ffffuuuullllllll aaaallllllll
  733.              Prints full thread information information about all threads.
  734.  
  735. PPPPrrrroooocccceeeessssssss GGGGrrrroooouuuupppp DDDDeeeebbbbuuuuggggggggiiiinnnngggg FFFFaaaacccciiiilllliiiittttiiiieeeessss
  736.      The process group facility allows a group of processes to be operated on
  737.      simultaneously by a single _d_b_x command.  This is far more convenient to
  738.      use when dealing with _s_p_r_o_ced processes than issuing individual rrrreeeessssuuuummmmeeee,
  739.      ssssuuuussssppppeeeennnndddd, or breakpoint setting commands.
  740.  
  741.      Whenever a process _s_p_r_o_cs, if the child is added to the process pool the
  742.      parent and child are added to the group list as well.  The group list is
  743.      simply a list of processes.
  744.  
  745.      aaaaddddddddppppggggrrrrpppp _p_i_d ...
  746.              Adds the process ids specified to the group list.  Only processes
  747.              in the process pool can be added to the group list.
  748.  
  749.      ddddeeeellllppppggggrrrrpppp _p_i_d ...
  750.              Deletes the process ids specified from the group list.
  751.  
  752.      sssshhhhoooowwwwppppggggrrrrpppp
  753.              Shows the group process list and the group breakpoint list.
  754.  
  755.  
  756.  
  757.  
  758.                                                                        PPPPaaaaggggeeee 11111111
  759.  
  760.  
  761.  
  762.  
  763.  
  764.  
  765. DDDDBBBBXXXX((((1111))))                                                                  DDDDBBBBXXXX((((1111))))
  766.  
  767.  
  768.  
  769.      wwwwaaaaiiiittttaaaallllllll Wait for any process currently running to breakpoint or stop for
  770.              any reason.  It waits on all running processes in the process
  771.              list, not just those in the group list.  It does not make the
  772.              process that stops first the active process.  Most useful after a
  773.              resume pgrp command.
  774.  
  775.  
  776. HHHHIIIINNNNTTTTSSSS
  777.      The command help help shows how to get this entire help file into your
  778.      favorite editor so you can search for topics of interest.  The help file
  779.      is far too large to use conveniently with _m_o_r_e(1).
  780.  
  781.      sssshhhhoooowwwwtttthhhhrrrreeeeaaaadddd ffffuuuullllllll
  782.  
  783. PPPPrrrroooocccceeeessssssss GGGGrrrroooouuuupppp DDDDeeeebbbbuuuuggggggggiiiinnnngggg FFFFaaaacccciiiilllliiiittttiiiieeeessss
  784.      The process group facility allows a group of processes to be operated on
  785.      simultaneously by a single _d_b_x command.  This is far more convenient to
  786.      use when dealing with _s_p_r_o_ced processes than issuing individual rrrreeeessssuuuummmmeeee,
  787.      ssssuuuussssppppeeeennnndddd, or breakpoint setting commands.
  788.  
  789.      Whenever a process _s_p_r_o_cs, if the child is added to the process pool the
  790.      parent and child are added to the group list as well.  The group list is
  791.      simply a list of processes.
  792.  
  793.      aaaaddddddddppppggggrrrrpppp _p_i_d ...
  794.              Adds the process ids specified to the group list.  Only processes
  795.              in the process pool can be added to the group list.
  796.  
  797.      ddddeeeellllppppggggrrrrpppp _p_i_d ...
  798.              Deletes the process ids specified from the group list.
  799.  
  800.      sssshhhhoooowwwwppppggggrrrrpppp
  801.              Shows the group process list and the group breakpoint list.
  802.  
  803.      wwwwaaaaiiiittttaaaallllllll Wait for any process currently running to breakpoint or stop for
  804.              any reason.  It waits on all running processes in the process
  805.              list, not just those in the group list.  It does not make the
  806.              process that stops first the active process.  Most useful after a
  807.              resume pgrp command.
  808.  
  809.  
  810. HHHHIIIINNNNTTTTSSSS
  811.      The command help help shows how to get this entire help file into your
  812.      favorite editor so you can search for topics of interest.  The help file
  813.      is far too large to use conveniently with _m_o_r_e(1).
  814.  
  815.      _d_b_x can be used as a calculator, since constant calculations can be done
  816.      without specifying or running a program.  A spelling error, like typing
  817.      oxf96 instead of 0xf96, will provoke the error message ``no active
  818.      process'' since _d_b_x presumes the oxf96 is a variable name.  Example
  819.      session:
  820.  
  821.  
  822.  
  823.  
  824.                                                                        PPPPaaaaggggeeee 11112222
  825.  
  826.  
  827.  
  828.  
  829.  
  830.  
  831. DDDDBBBBXXXX((((1111))))                                                                  DDDDBBBBXXXX((((1111))))
  832.  
  833.  
  834.  
  835.           $ dbx
  836.           (dbx) px ( 0xa5a893a + 0xf96) << 2
  837.           0x296a6340
  838.           (dbx)q
  839.  
  840.  
  841.      To get emacs-style line editing on the dbx command line, set the
  842.      environment variable before starting dbx.  LLLLIIIINNNNEEEEEEEEDDDDIIIITTTT. For example:  setenv
  843.      LINEEDIT ""
  844.  
  845. CCCCAAAAVVVVEEEEAAAATTTTSSSS
  846.      When debugging an MP program, disable SIGTERM by doing the following:
  847.  
  848.           (dbx) ignore TERM
  849.  
  850.      Although debugging is possible without this command, the MP program may
  851.      not terminate gracefully after execution is complete. Disabling SIGTERM
  852.      is not necessary for non-MP programs.
  853.  
  854.      For Fortran arrays (arrays defined in Fortran source) the Fortran syntax
  855.      of print x(1,2) works.  _d_b_x also allows somewhat C-like syntax (using
  856.      "[]" not "()") for Fortran array references, meaning that if x _i_s _a _t_w_o-
  857.      _d_i_m_e_n_s_i_o_n _F_o_r_t_r_a_n _a_r_r_a_y _p_r_i_n_t _x[_1,_2] will also work.  The x(1,2) notation
  858.      does not yet work in the duel command:  one must use x[1,2] with the duel
  859.      command.
  860.  
  861. FFFFIIIILLLLEEEESSSS
  862.      /usr/bin/dbx
  863.      /usr/lib/dbxpcs
  864.      /usr/lib/dbx.help
  865.  
  866. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  867.      dbxhang(1)
  868.      Compiling Debugging and Performance Tuning
  869.      /usr/lib/dbx.help
  870.  
  871. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  872.      warning: /proc not mounted
  873.  
  874.           This should not occur in normal operation.  The debug "file system"
  875.           which provides _d_b_x with the ability to trace processes has been
  876.           unmounted.  To re-mount this file system, perform the following
  877.           command as superuser (as described in mntproc(1M)):
  878.  
  879.                /etc/mntproc
  880.  
  881.  
  882.  
  883.  
  884.  
  885.  
  886.  
  887.  
  888.  
  889.  
  890.                                                                        PPPPaaaaggggeeee 11113333
  891.  
  892.  
  893.  
  894.